package org.sensornet2010.sensmote;

import java.util.Date;
import java.util.Enumeration;
import java.util.Vector;

public class DebugInformation extends Vector {

	public DebugInformation(){
		super();
	}
	public void addMessage(String message){
//		Date date = new Date();
//		String msg = date.toString() + "=>" + message; 
//		this.addElement(msg); 
	}
	
	public String getDebugInfoText(){
		String debugInfo = "";
		for (Enumeration enum = this.elements(); enum.hasMoreElements();  ) {
			String msg = enum.nextElement().toString();
			debugInfo = msg + "\n" + debugInfo;
		}
		Runtime runt=Runtime.getRuntime();
		long freeMemory = runt.freeMemory();
		debugInfo = "Free memory:" + freeMemory + "\n" + debugInfo;
		return debugInfo;
	}
	
}
